home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
chgenv20.zip
/
CHGENV.TXT
next >
Wrap
Text File
|
1990-08-22
|
9KB
|
265 lines
CHGENV.EXE
A DOS ENVIRONMENT EDITOR
BY
PETER A. HYMAN
(609) 799-2638
UPDATE VERSION: 8/90
Version 2 of CHGENV contains a bug fix to the original release, im-
proves the screen handling and display, and adds a command line option
which causes the environment to be sorted only. The executable is
called CHGENV2.EXE, however all references in the documentation refer
to it as CHGENV. You may wish to rename the file.
DESCRIPTION:
CHGENV (Change Environment) is a program designed to allow the user to
easily change settings in the Environment. With CHGENV, the user may
add to, delete from or modify any of the SETtings currently in effect.
CHGENV is particularly useful when a long environment variable (e.g.
PATH) requires modification. The user need not retype the entire SET
command with CHGENV, merely edit the setting. New to version 2 is the
ability to only sort the environment.
USAGE:
CHGENV has two modes of operation:
SORT ONLY: To only sort the current environment, type
type CHGENV -s or -S [ENTER].
A copyright and statistical messages will be displayed, then the mes-
sage Environment Successfully Updated will be displayed and the program
will end. The environment will be sorted in alphabetical order and may
be view with the DOS SET command.
FULL SCREEN INTERACTIVE MODE:
type CHGENV [ENTER].
CHGENV displays a copyright message followed by the location in memory
of the MASTER copy of the Environment, its Maximum allowable length
followed by the current length of all the environment strings in use.
The Maximum length may not be exceeded.
Next, CHGENV will display all currently SET environment variables in
ALPHABETICAL order. If more than 16 variables are set, a scroll bar
will be displayed in the left margin.
-- 1 -- Aug 1990
CHGENV.EXE
A DOS ENVIRONMENT EDITOR
BY
PETER A. HYMAN
(609) 799-2638
There are only three operations which CHGENV performs, and three keys
used to perform them:
INSERT KEY: Add a New Environment Variable
DELETE KEY: Delete Currently Selected Environment Variable
ALT-C KEY: Change Currently Selected Environment Variable
Pressing Control-Break, Control-C or ESCAPE immediately ends the pro-
gram. Pressing F10 ends the session prompting the user if he wishes to
save the changes. Even if no edits have been made, the environment has
been sorted and the Save Changes prompt will always appear.
A highlighter is always visible. It indicates the currently-selected
Environment Variable. To move the highlighter, the UP or DOWN Cursor,
HOME or END or RETURN Keys may be used to move about the screen.
ADDING A NEW ENVIRONMENT VARIABLE:
All Environment Variables may be a maximum of 128 characters or the re-
maining available environment space, whichever is less. The syntax
must be:
name=value
where name is the name of the Environment Variable (e.g. PROMPT), the
equal sign is mandatory with or without a space in between, and the
value is the text or numeric value to be associated with the Variable.
CHGENV will display a line near the bottom of the screen when INSERT is
pressed and prompt Add: , followed by a highlighted area. If the Envi-
ronment Variable is more than the screen width, the characters will
scroll until done. Any edit may be completed by pressing the UP or
DOWN cursor, HOME or END keys or RETURN. If the Environment Variable
to be added does not contain an equal sign, or if its length would
cause the total Environment Length to exceed its maximum, and error
will be reported.
If the Environment Variable to be added is the same as one already in
the Environment, it will replace the existing one (although the CHANGE
option could also be used to edit the existing Environment Variable).
Once editing is completed, the newly-added Environment Variable will be
sorted into the display.
-- 2 -- Aug 1990
CHGENV.EXE
A DOS ENVIRONMENT EDITOR
BY
PETER A. HYMAN
(609) 799-2638
DELETING AN ENVIRONMENT VARIABLE:
The currently highlighted Environment Variable may be deleted by press-
ing the DELETE Key. When this is done, the variable to be deleted will
flash and a prompt Delete This Environment String? will be displayed.
A 'Y' or 'N' in upper or lower case must be entered in response to this
prompt. If 'Y' is entered, the Environment String is deleted and the
list resorted and the Current Environment Length is recomputed.
CHANGING AN EXISTING ENVIRONMENT VARIABLE:
The screen handling has been overhauled for version 2, making editing
an environment much easier.
An environment variable may be selected by moving the highlighter up or
down using the Cursor UP, DOWN, HOME or END keys. The currently high-
lighted Environment Variable may be changed by pressing ALT-C. When
this is done, an edit box is displayed just to the right of the equal
sign and the cursor will be positioned at the beginning of the environ-
ment variable data string. To scroll the string, use the right or left
cursor keys. To delete characters, either the DELETE or BACKSPACE Keys
may be used. Both INSERT and OVERTYPE modes are now supported. If,
during an edit, you wish to throw away the changes, pressing ESCAPE
will undo the changes and return you to the first column position.
Pressing ESCAPE a second time will abort the edit. Any edit may be
completed by pressing the UP or DOWN cursor, HOME or END keys or RE-
TURN. The Screen cursor will move up or down the screen accordingly.
SAVING THE CHANGES:
After all Environment Changes have been completed, F10 may be pressed
to save the changes. Replying 'Y' to the Save Changes? prompt will
cause the modified environment to be copied back into the Master Envi-
ronment Location. This is the copy of the environment which is given
to each process or subprocess. Any TSRs already loaded have already
inherited their environments and cannot be affected by this change.
However, all new commands, programs or new invocations of a command
processor will inherit the modified environment.
-- 3 -- Aug 1990
CHGENV.EXE
A DOS ENVIRONMENT EDITOR
BY
PETER A. HYMAN
(609) 799-2638
DISCLAIMER:
Every effort has been made to test this program and assure its integ-
rity. If it does not work on your system, please let me know immedi-
ately.
This program is being placed in the public domain as shareware. Please
distribute it freely to other BBSs or users. You should include the
files CHGENV2.EXE and CHGENV.TXT. You may not ch